package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.Product;
import cn.wolfcode.feign.fallback.ProductFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;


import java.util.List;

@FeignClient(value = "product-service",fallback = ProductFallback.class)
public interface ProductFeignApi {
    @RequestMapping("/product/queryProductByIds")
    //简单的数据类型用requestparam,集合对象用RequestBody
    Result<List<Product>> queryProductByIds(@RequestBody List<Long> ids);
}
